package other.callback;

public class TaskExecute {

    private NotifyCallback notifyCallback;

    public TaskExecute(MainExecute mainExecute) {
        this.notifyCallback = mainExecute;
    }

    public void doSomething(){

        System.out.println("do something!!!");
        notifyCallback.onMessageBack("do return data");
    }

    public void closeSomething(){
        System.out.println("close something!!!");
        notifyCallback.close("close  return data");
    }

    public interface NotifyCallback{
        public void  onMessageBack(String messae);
        public void close(String messae);

    }
}
